import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:seedfour/app/theme.dart';

import '../../../models/notice_v2_entity.dart';

class NoticeDetailState {
  var noticeInfoList = <NoticeDetailSubItemInfo>[].obs;
  var noticeReceiverList = <NoticeDetailSubItemInfo>[].obs;

  var isLoading = true.obs;

  var noticeData = NoticeV2Entity().obs;
  var ownerUid = ''.obs;

  final Map<int, (String, Color)> noticeStatus = {
    0: ('可领取', AppColor.colorFontOrange),
    1: ('已领取', AppColor.colorFontBlue),
    2: ('已成交', AppColor.colorFontGreen),
  };

  final Map<int, (String, Color)> historyType = {
    0: ('发布', AppColor.colorFontOrange),
    1: ('领取', AppColor.colorFontBlue),
    2: ('退回', AppColor.colorFontRed),
    3: ('成交', AppColor.colorFontGreen),
    4: ('进度', AppColor.colorFontGrey),
  };
}

class NoticeDetailItemInfo {
  String title;
  List<dynamic> subItemList;

  NoticeDetailItemInfo({
    required this.title,
    required this.subItemList,
  });
}

class NoticeDetailSubItemInfo {
  String title;
  String content;
  Color contentColor;

  NoticeDetailSubItemInfo({
    required this.title,
    required this.content,
    this.contentColor = Colors.black87,
  });
}
